<script setup>
import {ref} from 'vue'
import { articleGetChannelListService } from '@/api/article'
const channelList = ref([])
const getChannelList = async ()=>{
  const res = await articleGetChannelListService()
  channelList.value = res.data.data
}
getChannelList()
// 分类名称的id--cate_id来自父组件
const cate_id = defineModel('cate_id')
defineProps({
  width:{
    type:String
  }
})
</script>
<template>
  <el-select
    :style="{width}"
    v-model="cate_id"
  >
    <el-option
      v-for="item in channelList"
      :key="item.id"
      :label="item.cate_name"
      :value="item.id"
    />
  </el-select>
</template>

